home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group97a.txt / 000034_icon-group-sender _Mon Feb 3 16:15:48 1997.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 3 Feb 1997 16:38:28 MST
  2. Message-Id: <1.5.4.32.19970203221548.0073d484@post.its.mcw.edu>
  3. X-Sender: cdt@post.its.mcw.edu
  4. X-Mailer: Windows Eudora Light Version 1.5.4 (32)
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset="us-ascii"
  7. Date: Mon, 03 Feb 1997 16:15:48 -0600
  8. To: icon-group@cs.arizona.edu
  9. From: Chris Tenaglia <cdt@post.its.mcw.edu>
  10. Subject: table dimensions
  11. Errors-To: icon-group-errors@cs.arizona.edu
  12. Status: RO
  13. Content-Length: 1031
  14.  
  15. I've made 2-d tables. The index of a table can be
  16. thought of as a database key. n-dimensions can
  17. be supported by cleverly constructing the index.
  18. Let's say I have x, and y to index a table. If x, and
  19. y are integers here are some reference samples.
  20.  
  21.     db := table("n/a")
  22.     ....lotsa code....
  23.  
  24.         db[x || "," || y] := newstuff
  25.         work := db[x || "," || y]
  26.         ....more code....
  27.         x := hashx(dbkey)
  28.         y := hashy(dbkey)
  29.         update(db[x || "," || y])
  30.  
  31. Obviously, this is just pseudocode, but I've used
  32. the methodology to write some small databases.
  33. I also used it in graphics to write some 3-d graphics.
  34. Then use array[x || "," || y || "," || z] to reference
  35. the points in 3-d. Thus you can convert one dimension
  36. into N dimensions.
  37.  
  38. Chris.
  39.  
  40.         
  41.  
  42. Chris Tenaglia (system manager)         |       cdt@post.its.mcw.edu
  43. Medical College of Wisconsin            |
  44. 8701 W. Watertown Plank Rd.             |      Ce que vous voyez est
  45. Milwaukee, WI 53226 (414)456-8765       |      Ce que vous obtenez !
  46.  
  47.